//#define __FORCE_TRACE__
//#define __FORCE_DEBUG__
//#define __FORCE_INFO__
#define THIS_FILE "adminActions\fn_pveh.sqf"
#include <core_macros.h>

TRACE_1("Start",_this);
TMFPROFILERSTART;

private ["_event_name","_event_params"];
PARAMS_2(_event_name, _event_params);

switch (_event_name) do {
	case QGVAR(LOG): {
		if (isServer) then { _event_params call FUNC(log); };
	};
	case QGVAR(GHOSTMODE): {
		if (isServer) then { _event_params call FUNC(log); };
		if (count _event_params > 1) then {
			if (! local (_event_params select 0)) then {
				(_event_params select 0) setcaptive (_event_params select 1);
			};
		};
	};
	case QGVAR(BAN): {
		_event_params call FUNC(ban);
	};
	case QGVAR(KICK): {
		_event_params call FUNC(kick);
	};
	case QGVAR(JAIL): {
		_event_params call FUNC(jail);
	};
	case QGVAR(UNJAIL): {
		_event_params call FUNC(unjail);
	};
	case QGVAR(INFORM): {
		_event_params call FUNC(informplayer);
	};
	case QGVAR(TELEPORTTOBASE): {
		_event_params spawn FUNC(teleportToBase);
	};
	case QGVAR(DESTROY): {
		_event_params spawn FUNC(destroy);
	};
	case QGVAR(REPAIR): {
		_event_params spawn FUNC(repair);
	};
	default {
		if (isServer) then { _this call FUNC(log); };
	};
};

TRACE("End");
TMFPROFILERSTOP;
